"""
表情符号工具类

用于在日志中添加表情符号，提高日志的可读性
"""


class EmojiUtils:
    """表情符号工具类"""
    
    # 基本日志级别表情符号
    INFO = "ℹ️"
    WARNING = "⚠️"
    ERROR = "❌"
    DEBUG = "🐛"
    SUCCESS = "✅"
    
    # 测试相关表情符号
    TEST_STEP = "📝"
    TEST_PASS = "✅"
    TEST_FAIL = "❌"
    TEST_SKIP = "⏭️"
    
    # 操作相关表情符号
    START = "🚀"
    STOP = "🛑"
    PAUSE = "⏸️"
    RESUME = "▶️"
    
    # 状态相关表情符号
    LOADING = "⏳"
    COMPLETE = "✅"
    PROGRESS = "📊"
    
    # 文件操作表情符号
    FILE_READ = "📖"
    FILE_WRITE = "📝"
    FILE_DELETE = "🗑️"
    
    # 网络相关表情符号
    NETWORK = "🌐"
    DOWNLOAD = "⬇️"
    UPLOAD = "⬆️"
    
    @classmethod
    def get_emoji(cls, level):
        """根据日志级别获取对应的表情符号"""
        emoji_map = {
            'info': cls.INFO,
            'warning': cls.WARNING,
            'error': cls.ERROR,
            'debug': cls.DEBUG,
            'success': cls.SUCCESS,
            'test_step': cls.TEST_STEP
        }
        return emoji_map.get(level.lower(), cls.INFO)